package com.mofeng.myshop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mofeng.myshop.domain.po.Project;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 项目 Mapper 接口
 * </p>
 *
 * @author MoFeng
 * @since 2024-04-15
 */
public interface IProjectMapper extends BaseMapper<Project> {

    @Select({"<script>",
            "SELECT * FROM `tb_project` ",
            "<where>",
            "<if test='show != null'>",
            "AND `show` = #{show}",
            "</if>",
            "</where>",
            "</script>"})
    List<Project> findByShow(@Param("show") String defaultState);
}
